import request from '@/utils/request'


export function fetchSingleStar(starId) {
    return request({
        url: `/star/${starId}`,
        method: 'get'
    })
}


export function getAllStarsByPage(pageNum,pageSize){
    return request({
        url:'/star/allByPage?pageNum='+pageNum+'&pageSize='+pageSize,
        method:'get'
    })
}


export function uploadStar(data) {
    return request({
        url:'/star/save',
        method:'post',
        dataType:'json',
        data
    })
}

export function updateStar(data) {
    return request({
        url:'/star/update',
        method:'post',
        dataType:'json',
        data
    })
}


export function deleteStar(starId){
    return request({
        url: `/star/delete/${starId}`,
        method:'delete'
    })
}

export function getPath(data){
    return request({
        url: `/transfer/upload`,
        method:'post',
        contentType:'multipart/form-data',
        data
    })
}
